﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.ServiceProcess;
using System.Text;

namespace SocketServer
{
    public partial class SocketServer : ServiceBase
    {
        SocketListener sl = null;
        public SocketServer()
        {
            InitializeComponent();
        }

        protected override void OnStart(string[] args)
        {
            sl = new SocketListener();
            sl.Start();
        }

        protected override void OnStop()
        {
            sl.Stop();
            // TODO: 在此处添加代码以执行停止服务所需的关闭操作。
        }
    }
}
